package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.AccType;
import com.example.shoppingmall.pojo.Account;
import com.example.shoppingmall.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AccountMapper {

    //多条件查询+分页
    public List<Account> getAccList(@Param("userPhone") String userPhone, @Param("acc_typeId") Integer acc_typeId,
                                    @Param("pageNo") Integer pageNo, @Param("pageNum") Integer pageNum);

    //查询总条数
    public int total(@Param("userPhone") String userPhone, @Param("acc_typeId") Integer acc_typeId);


    //新增(消费、提款)
    public int retAdd(Account account);

    //新增(退款)
    public int retAddto(Account account);

    //修改资金(消费、提款)
    public int userUpdate(User user);

    //修改资金(退款)
    public int userUpdateto(User user);
    //查询
    public User user1(@Param("username")String username);

    public User user2();

    //acc_type类型查询
    public List<AccType> getAccTy();

}
